home *** CD-ROM | disk | FTP | other *** search
- /* Import birthdays from DFAddress.
-
- The birthdays should be either:
-
- DD/MM-YY or
- DD/MM-YYYY
- */
-
- Options FailAt 21
- Options Results
-
- If Show(Ports,'DFA') = 0 Then
- Do;Say "Start DFA first.";Exit;End
-
- If Show(Ports,'MaylandRexx') = 0 Then
- Do;Say "Start Mayland first.";Exit;End
-
- Address 'DFA' First Stem P.
- Added = 0 ; Failed = 0
-
- Do While RC = 0
-
- First = P.Address.1
- Name = P.Address.2
- Birth = P.Address.9
-
- If Birth ~= "" Then Do
- Parse Var Birth Date '/' Month '-' Year
- If Year < 1900 Then Year = Year + 1900
- Msg = '"Idag fylder' First Name '%y-'Year' år"'
- Address 'MaylandRexx' AddDate Date Month 0 12 00 Before 5*24*60 After 30*24*60 Message Msg
- If RC = 0 Then Added = Added + 1
- Else Failed = Failed + 1
- End
-
- Address 'DFA' Next Stem P.
- End
-
- Say "I've succesfully added" Added "birthday-event(s)," Failed "failed!"
- Exit
-